Repository navigation
fix(compiler): include unmatched values in try_clause errors - #26
Merged
Merged
Conversation
mremond
force-pushed
the
fm/task-55b52329
branch
from
November 13, 2026 19:05
50100f0 to
5836a49
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
Unmatched try-of clauses should report the original value in their error, matching BEAM.
What changed
Before and after
Before: An unmatched try-of result raised the bare try_clause atom and discarded the value.
After: Unmatched results now produce a two-element reason tuple containing try_clause and the original value.
This changes compiler-generated exception values, not a graphical view; native and BEAM execution transcripts demonstrate the result.
Checked
Live validation: Demonstrated for this version. 1 of 1 scenarios driven live in the product.
How it was checked
cargo build --release --locked -p nera-runtime; cargo build --release --locked
cargo test --locked -p nera-ir
cargo clippy --workspace --all-targets --locked -- -D warnings
cargo test --workspace --locked --no-fail-fast
python3 scripts/test-allocator-config.py
target/release/nera test -j 1 --timeout 30
bash scripts/test-cross.sh with x86_64-apple-darwin and aarch64-unknown-linux-gnu targets
The added lowering test and native fixture each passed ten consecutive runs; the same fixture compiled with erlc -Werror and completed ten times on BEAM.
All 18 applicable hosted checks succeeded; three unrelated editor and packaging checks were skipped by the change map.
Risk
Risk: low in every dimension.
Full risk assessment
Not done
Windows native execution and execution on the two cross-compile targets were not verified.
Pipeline
Updates from git push no-mistakes
Infinitary checked this version: an independent review that also judged the documents, and live validation the review accepted.